"! Info:
An array subclass that ensures that all of its elements are always in order.
Examples:

"
Array subclass: OrderedArray [
<category: 'Library-Collections'>
"! Info:
Insert a new value into the OrderedArray keeping the ordering correct.

Examples:
"
add: value [
^ self insert: value at: (self location: value)
]

"! Info:
Return true if this array contains value 

Examples:
"
includes: value [
| pos |
pos := self location: value.
^ (pos <= self size) and: [ value = (self at: pos)]
]

"! Info:
Return the index of the first item smaller than value in the array.
Examples:
"
location: value [
| low high mid |
low := 1.
high := self size + 1.
[ low < high ] whileTrue: [ 
	mid := (low + high) / 2.
	(self at: mid) < value ifTrue: [
		low := mid + 1 
	] ifFalse: [ 
		high := mid 
	] 
].
^ low
]

]

"! "
MetaArray subclass: MetaOrderedArray [
<category: 'Library-Collections'>
]

